<br>
<div class="panel panel-default shadowed">
    <div class="panel-heading clearfix">
        <h2 class="panel-title pull-left">Feedbacks</h2>
        <div class="pull-right">
            <form class="form">
                <input type="text" class="form-control" ng-model="fc.searchFeedback" placeholder="Search...">
            </form>
        </div>
        <div class="pull-right">
            <form class="form">
                Show all <input type="checkbox" ng-model="fc.showAll">
            </form>
        </div>
    </div>
    <div class="panel-body">
        <table class="table table-hover table-mouse-hover">
            <thead>
            <tr>
                <th>Username</th>
                <th>Date</th>
                <th>Title</th>
            </tr>
            </thead>
            <tbody>
            <tr ng-repeat="feedback in fc.feedbacks | filter: fc.searchFeedback | filter: fc.filterFeedbacks" ng-click="fc.handleFeedback(feedback)">
                <td>{{fc.getFeedbackUsername(feedback)}}</td>
                <td>{{feedback.submit_date | date}}</td>
                <td>{{feedback.title}}</td>
            </tr>
            </tbody>
        </table>
    </div>
</div>

<script type="text/ng-template" id="handleFeedback">
    <div class="modal fade">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <h4 class="modal-title" id="handleFeedbackLabel">Answer Feedback</h4>
                </div>
                <div class="modal-body">
                    <form role="form">
                        <div class="row">
                            <div class="form-group col-md-12">
                                <label for="title2">Title</label>
                                <input type="text" ng-model="hfc.feedback.title" class="form-control" id="title2" ng-disabled="true">
                            </div>
                            <div class="form-group col-md-12">
                                <label for="content2">Content</label>
                                <textarea ng-model="hfc.feedback.content" class="form-control" id="content2" style="height:100px;" ng-disabled="true"></textarea>
                            </div>
                            <div class="form-group col-md-12">
                                <label for="response">Response</label>
                                <textarea ng-model="hfc.feedback.response" class="form-control" id="response" style="height:100px;"></textarea>
                            </div>
                            <div class="form-group col-md-4">
                                <label for="status">Status</label>
                                <select class="form-control" ng-model="hfc.feedback.status" id="status">
                                    <option style="display:none" value="0">Select status</option>
                                    <option value="1">Closed</option>
                                    <option value="2">Reviewing</option>
                                </select>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-warning" data-dismiss="modal" ng-click="hfc.close('none')">
                        <span class="fa fa-close"></span> Cancel
                    </button>
                    <button type="button" class="btn btn-success" data-dismiss="modal" ng-click="hfc.close('update')">
                        <span class="fa fa-check"></span> Submit
                    </button>
                </div>
            </div>
        </div>
    </div>
</script>